
import { Component, ViewEncapsulation, OnInit, Input, OnChanges } from '@angular/core';
import { ILoginConfig } from './module/login.module';
import { TranslateService } from 'ng2-translate';


// let Constants={
//     EN_US: 'en-us',
//     ZH_CH: 'zh-cn'
// }

@Component({
    template: "<wit-login [loginConfig]='loginConfig'></wit-login>",
    encapsulation: ViewEncapsulation.None,
})
export class IndexComponent{
    loginConfig: ILoginConfig;
    constructor(){//private translate: TranslateService) {
        // translate.setTranslation('en-us'  , enResource);        
        // translate.setTranslation('zh-cn', cnResource);
        // this.translate.setDefaultLang('en-us');
        // translate.use('zh-cn');
        let submitHandle = function () {
            console.log('click login button');
        }
       
        let languages = [{
            label: 'EN',
            value: 'en-us'
        }, {
            label: 'CN',
            value: 'zh-cn'
        }];
        this.loginConfig = {
           // project: project,
            languages: languages,
            onSubmit: submitHandle
        }
    }

}

